package soap;

import org.eclipse.californium.core.Utils;
import org.eclipse.californium.core.coap.CoAP.Code;
import org.eclipse.californium.core.coap.Request;
import org.eclipse.californium.core.coap.Response;

public class RequestTest {

	public static void main(String[] args) throws InterruptedException {

		Request request = new Request(Code.GET);
		request.setURI("coap://127.0.0.1:5683/sync?appKey=zq6NDc3sb6QmoQF1&appSecret=PosmJNUoMLD777Nf7tlu");
		request.setPayload("safdasdfs");
		
		request.send();
		Response response = request.waitForResponse();
		System.out.println(Utils.prettyPrint(response));
	}

}
